default_key=""
from jili.ibot.chat_qy import chat_qywx
chats={}
def set_default_key(key):
    global default_key
    default_key=key
def get_chart(key):
    global chat
    if key not in chats.keys():
        chats[key] = chat_qywx(key)
    chat=chats[key]
    return chat
def send_msg(s,key=default_key):
    chat=get_chart(key)
    chat.send_msg(s)
def send_markdown(s,key=default_key):
    chat = get_chart(key)
    chat.send_markdown(s)
def send_file(f,key=default_key):
    chat = get_chart(key)
    chat.send_file(f)
def send_image(f,key=default_key):
    chat = get_chart(key)
    chat.send_image(f)